import { getRequest, AddContTypePostRequest, postRequest2 } from '@/lib/smart-request';

export const TaskApi = {
	getTaskValue:()=>{
		return getRequest('/user/front/users/info', false);
	},
	getTaskList:(param)=>{
		return getRequest('/user/front/task/task/page', param);
	},
	ReceiveTask:(param)=>{
		return postRequest2('/user/front/task/receive/single', param);
	},
	FinishTask:(param)=>{
		return postRequest2('/user/front/task/finish/single', param);
	},
	getRewardList:()=>{
		return getRequest('/user/front/sign/reward/list', false);
	},
	CollectAll:(param)=>{
		return AddContTypePostRequest('/user/front/task/receive/batch', 'POST', param, true, { 'Content-Type': 'application/x-www-form-urlencoded'});
	},
	IndividualClaim:(param)=>{
		return AddContTypePostRequest('/user/front/task/receive/single', 'POST', param, true, { 'Content-Type': 'application/x-www-form-urlencoded'});
	},
	SingIn:()=>{
		return AddContTypePostRequest('/user/front/sign/create', 'POST', true, { 'Content-Type': 'application/x-www-form-urlencoded'});
	},
	QueryRewordList:(param)=>{
		return getRequest('/user/front/sign/reward/list', param);
	},
}